import request from '@/utils/request'
export const regAPI = obj => {
  return request.post('/api/reg', obj)
}
export const loginAPI = obj => {
  return request.post('/api/login', obj)
}
export const getUserAPI = () => {
  return request.get('/my/userinfo')
}
export const updateUserAPI = data => {
  // return request.put('/my/userinfo', 请求体)
  return request.put('/my/userinfo', data)
}
export const updatePwdAPI = data => {
  // return request.put('/my/userinfo', 请求体)
  return request.patch('/my/updatepwd', data)
}
export const uploadAPI = data => {
  // return request.put('/my/userinfo', 请求体)
  return request.patch('/my/update/avatar', { avatar: data })
}
